package com.sms.controller;

import cn.hutool.json.JSONUtil;
import com.sms.common.A;
import com.sms.service.impl.FundsServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
//资金删除
@WebServlet("/FundsRemove")
public class FundsRemoveController extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int ID=Integer.parseInt(req.getParameter("fundID"));

        FundsServiceImpl impl=new FundsServiceImpl();
        impl.removeById(ID);

        resp.getWriter().write(JSONUtil.toJsonStr(A.success("删除成功")));
    }
}
